package com.service.business.base.controller;

import com.service.business.base.service.AreaService;
import com.service.core.rest.BaseController;
import com.service.core.rest.response.OneResponse;
import com.service.utility.common.UUIDUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <dl>
 * <dt>platform</dt>
 * <dd>Description:</dd>
 * <dd>Copyright: Copyright (C) 2015</dd>
 * <dd>Company: </dd>
 * <dd>CreateDate: 2019年05月12日</dd>
 * </dl>
 *
 * @author
 */
@Slf4j
@RestController
@RequestMapping("/area")
@Api(tags = "地区表")
public class AreaController extends BaseController {

    @Autowired
    private AreaService areaService;

    @ApiOperation("获取城市地区")
    @GetMapping("/get-country-area")
    public OneResponse<Map<String, Object>> getCountryAllArea() {
        String uuid = UUIDUtil.randomUUID();
        log.info("请求开始 Msg:UUID:{}", uuid);
        Map<String, Object> data = areaService.getCountryArea();
        log.info("请求结束： UUID:{}", uuid);
        return successQueryOneResponse(data);
    }


}
